﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using dhSystemBLL.orderData;
using baseSet.importExport;

namespace dhsystem.orderForm
{
    public partial class Frmorderpname : Form
    {
        public Frmorderpname()
        {
            InitializeComponent();
        }
        pbomMasterBLL pbom = new pbomMasterBLL();
        string state;
       
        private void Frmorderpname_Load(object sender, EventArgs e)
        {
            bgSourceorderpname.DataSource = pbom.getorderpnameAll();
            dGridorderpname.DataSource = bgSourceorderpname;
            DcolumnSet.colSet(moduleInfo.orderpname , dGridorderpname);
            toolStripStatusLabel1.Text = "数据总条数:" + dGridorderpname.RowCount.ToString() + "条";
        }

        private void toolStripButton18_Click(object sender, EventArgs e)
        {
            FrmExcelExport frm = new FrmExcelExport(moduleInfo.orderpname, dGridorderpname, "未排染单信息");
            frm.ShowDialog();
        }

        private void toolStripButton13_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void 制作工艺资料ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            state = "新增";
            FrmPbomMasterAdd pbomMasterAdd = new FrmPbomMasterAdd(bgSourceorderpname, state, dGridorderpname.Rows[dGridorderpname.CurrentRow.Index].Cells[0].Value.ToString());
            pbomMasterAdd.ShowDialog();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            bgSourceorderpname.DataSource = pbom.getorderpnameAll();
            dGridorderpname.DataSource = bgSourceorderpname;
            DcolumnSet.colSet(moduleInfo.orderpname, dGridorderpname);
            toolStripStatusLabel1.Text = "数据总条数:" + dGridorderpname.RowCount.ToString() + "条";
        }
    }
}
